
package com.shop.cloud.mall.api.service;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.shop.cloud.mall.common.dto.PlaceOrderDTO;
import com.shop.cloud.mall.common.entity.OrderInfo;
import jakarta.servlet.http.HttpServletRequest;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 商城订单
 *
 * @author
 * @date 2019-09-10 15:21:22
 */
public interface OrderInfoService extends IService<OrderInfo> {

	/**
	 * 新增订单
	 * @param placeOrderDTO
	 */
	OrderInfo orderAddOne(HttpServletRequest request, PlaceOrderDTO placeOrderDTO);

	/**
	 * 新增订单集合
	 * @param mapPlaceOrderDTO
	 */
	List<OrderInfo> orderAddMap(HttpServletRequest request, Map<String, PlaceOrderDTO> mapPlaceOrderDTO);

	IPage<OrderInfo> page2(IPage<OrderInfo> page, OrderInfo orderInfo);

	OrderInfo getById2(Serializable id);

	/**
	 * 取消订单
	 * @param orderInfo
	 */
	void orderCancel(OrderInfo orderInfo);
	/**
	 * 订单收货
	 * @param orderInfo
	 */
	void orderReceive(OrderInfo orderInfo);

	/**
	 * 处理订单回调
	 * @param orderInfo
	 */
	void notifyOrder(OrderInfo orderInfo);

	/**
	 * 物流信息回调
	 * @param jsonObject
	 */
	void notifyLogisticsr(JSONObject jsonObject);

	/**
	 * 余额支付
	 * @param orderInfo
	 */
	void balancePay(OrderInfo orderInfo);
}
